import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-10-19  08:46
 */
public class Test1 {
    public static void main(String[] args) {
        int[][] ary = new int[10][];
        for(int i = 0; i < ary.length; i++) {
            ary[i] = new int[i + 1];
            for(int j = 0; j < ary[i].length; j++) {
                if(j == 0 || j == ary[i].length-1) {
                    ary[i][j] = 1;
                }else {
                    ary[i][j] = ary[i - 1][j] + ary[i - 1][j-1];
                }
            }
        }
        for(int i = 0; i < ary.length; i++) {
            for(int j = 0; j < ary[i].length; j++) {
                System.out.print(ary[i][j] + " ");
            }
            System.out.println();
        }
    }
}
